//-----------------------------------------------------------------------
// <copyright file="a_CouponBase.cs" company="AACECOM">
//     Copyright (c) AACECOM. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
	
using System;
using System.Data;
using System.ComponentModel;
using System.Collections;

namespace ThoiTrang.Entities
{
	[Serializable]
	public class a_CouponBase
	{
		
		#region Variable Declarations
		private int				couponID = 0;
		private string				redemptionCode = string.Empty;
		private string				name = string.Empty;
		private string				note = string.Empty;
		private byte				couponType = 0;
		private string				recipientEmail = string.Empty;
		private DateTime				dateCreated = new DateTime(1900,1,1,0,0,0,0);
		private DateTime				dateStart = new DateTime(1900,1,1,0,0,0,0);
		private DateTime				dateEnd = new DateTime(1900,1,1,0,0,0,0);
		private byte				eligibleType = 0;
		private decimal				req_MinOrderAmt = 0;
		private int				req_MinItemQty = 0;
		private bool				minQtyType = false;
		private bool				req_Extended = false;
		private bool				couponValueType = false;
		private int				couponValue = 0;
		private bool				applyTo = false;
		private bool				combinable = false;
		private bool				incOnSpecials = false;
		private bool				isDelete = false;
		private byte				status = 0;
		private bool				isLock = false;
		private int				domainID = 0;
		private int				limitfirstper = 0;
		private int				limitmaxqty = 0;
		private int				limitmaxpur = 0;
		private bool				isReq_MinOrderAmt = false;
		private bool				isReq_MinItemQty = false;
		private bool				islimitfirstper = false;
		private int				countfirstper = 0;
		private bool				islimitmaxqty = false;
		private bool				islimitmaxpur = false;
		private string				freeShippingService = string.Empty;
		private bool				freeTax = false;
		private bool				isExpired = false;
		#endregion
		
		#region Constructors
		public a_CouponBase() {}
		
		public a_CouponBase (
			int couponID,
			string redemptionCode,
			string name,
			string note,
			byte couponType,
			string recipientEmail,
			DateTime dateCreated,
			DateTime dateStart,
			DateTime dateEnd,
			byte eligibleType,
			decimal req_MinOrderAmt,
			int req_MinItemQty,
			bool minQtyType,
			bool req_Extended,
			bool couponValueType,
			int couponValue,
			bool applyTo,
			bool combinable,
			bool incOnSpecials,
			bool isDelete,
			byte status,
			bool isLock,
			int domainID,
			int limitfirstper,
			int limitmaxqty,
			int limitmaxpur,
			bool isReq_MinOrderAmt,
			bool isReq_MinItemQty,
			bool islimitfirstper,
			int countfirstper,
			bool islimitmaxqty,
			bool islimitmaxpur,
			string freeShippingService,
			bool freeTax,
			bool isExpired)
		
		{
			this.couponID = couponID;
			this.redemptionCode = redemptionCode;
			this.name = name;
			this.note = note;
			this.couponType = couponType;
			this.recipientEmail = recipientEmail;
			this.dateCreated = dateCreated;
			this.dateStart = dateStart;
			this.dateEnd = dateEnd;
			this.eligibleType = eligibleType;
			this.req_MinOrderAmt = req_MinOrderAmt;
			this.req_MinItemQty = req_MinItemQty;
			this.minQtyType = minQtyType;
			this.req_Extended = req_Extended;
			this.couponValueType = couponValueType;
			this.couponValue = couponValue;
			this.applyTo = applyTo;
			this.combinable = combinable;
			this.incOnSpecials = incOnSpecials;
			this.isDelete = isDelete;
			this.status = status;
			this.isLock = isLock;
			this.domainID = domainID;
			this.limitfirstper = limitfirstper;
			this.limitmaxqty = limitmaxqty;
			this.limitmaxpur = limitmaxpur;
			this.isReq_MinOrderAmt = isReq_MinOrderAmt;
			this.isReq_MinItemQty = isReq_MinItemQty;
			this.islimitfirstper = islimitfirstper;
			this.countfirstper = countfirstper;
			this.islimitmaxqty = islimitmaxqty;
			this.islimitmaxpur = islimitmaxpur;
			this.freeShippingService = freeShippingService;
			this.freeTax = freeTax;
			this.isExpired = isExpired;
		}
		#endregion
		
		#region Properties	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int CouponID
		{
			get { return couponID; }
			set { couponID = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is varchar</value>
		public string RedemptionCode
		{
			get { return redemptionCode; }
			set { redemptionCode = value; }
		}
	
		/// <summary>
		/// 	short desc of coupon deals/certificate
		/// </summary>
		/// <value>This type is varchar</value>
		public string Name
		{
			get { return name; }
			set { name = value; }
		}
	
		/// <summary>
		/// 	detail seller note for this coupon/cert, Cert: message to receipient
		/// </summary>
		/// <value>This type is varchar</value>
		public string Note
		{
			get { return note; }
			set { note = value; }
		}
	
		/// <summary>
		/// 	0=multi-user coupon,1=single user coupon,2=gift certificate
		/// </summary>
		/// <value>This type is tinyint</value>
		public byte CouponType
		{
			get { return couponType; }
			set { couponType = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is varchar</value>
		public string RecipientEmail
		{
			get { return recipientEmail; }
			set { recipientEmail = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is datetime</value>
		public DateTime DateCreated
		{
			get { return dateCreated; }
			set { dateCreated = value; }
		}
	
		/// <summary>
		/// 	Cert: date to send email to receipient
		/// </summary>
		/// <value>This type is datetime</value>
		public DateTime DateStart
		{
			get { return dateStart; }
			set { dateStart = value; }
		}
	
		/// <summary>
		/// 	Cert: Last Date eligible for full refund
		/// </summary>
		/// <value>This type is datetime</value>
		public DateTime DateEnd
		{
			get { return dateEnd; }
			set { dateEnd = value; }
		}
	
		/// <summary>
		/// 	0=all,1=cat,2=subcat,3=subcat2,4=SecCat,5=SecSubCat,6=SecSubCat2,7=Mfg,8=Brand,9=item
		/// </summary>
		/// <value>This type is tinyint</value>
		public byte EligibleType
		{
			get { return eligibleType; }
			set { eligibleType = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is money</value>
		public decimal Req_MinOrderAmt
		{
			get { return req_MinOrderAmt; }
			set { req_MinOrderAmt = value; }
		}
	
		/// <summary>
		/// 	For QualProdType=Item only
		/// </summary>
		/// <value>This type is int</value>
		public int Req_MinItemQty
		{
			get { return req_MinItemQty; }
			set { req_MinItemQty = value; }
		}
	
		/// <summary>
		/// 	0=by item; 1=by order
		/// </summary>
		/// <value>This type is bit</value>
		public bool MinQtyType
		{
			get { return minQtyType; }
			set { minQtyType = value; }
		}
	
		/// <summary>
		/// 	BuyThisGetThat |  0=No,1=Yes
		/// </summary>
		/// <value>This type is bit</value>
		public bool Req_Extended
		{
			get { return req_Extended; }
			set { req_Extended = value; }
		}
	
		/// <summary>
		/// 	1=Percent; 0=Dollar (Cert: default)
		/// </summary>
		/// <value>This type is bit</value>
		public bool CouponValueType
		{
			get { return couponValueType; }
			set { couponValueType = value; }
		}
	
		/// <summary>
		/// 	Cert: face value
		/// </summary>
		/// <value>This type is int</value>
		public int CouponValue
		{
			get { return couponValue; }
			set { couponValue = value; }
		}
	
		/// <summary>
		/// 	0=order (Cert: default), 1=individual items
		/// </summary>
		/// <value>This type is bit</value>
		public bool ApplyTo
		{
			get { return applyTo; }
			set { applyTo = value; }
		}
	
		/// <summary>
		/// 	Allow to combine with other offer or not
		/// </summary>
		/// <value>This type is bit</value>
		public bool Combinable
		{
			get { return combinable; }
			set { combinable = value; }
		}
	
		/// <summary>
		/// 	apply discount on top of On Specials products? 1: yes 0: no
		/// </summary>
		/// <value>This type is bit</value>
		public bool IncOnSpecials
		{
			get { return incOnSpecials; }
			set { incOnSpecials = value; }
		}
	
		/// <summary>
		/// 	0 =No, 1 = Yes
		/// </summary>
		/// <value>This type is bit</value>
		public bool IsDelete
		{
			get { return isDelete; }
			set { isDelete = value; }
		}
	
		/// <summary>
		/// 	0 = Pending; 1=Effective,2=Canceled/Cert Refunded,3=Expired/Cert: Used
		/// </summary>
		/// <value>This type is tinyint</value>
		public byte Status
		{
			get { return status; }
			set { status = value; }
		}
	
		/// <summary>
		/// 	After the first use any modification will not be allowed
		/// </summary>
		/// <value>This type is bit</value>
		public bool IsLock
		{
			get { return isLock; }
			set { isLock = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int DomainID
		{
			get { return domainID; }
			set { domainID = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int Limitfirstper
		{
			get { return limitfirstper; }
			set { limitfirstper = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int Limitmaxqty
		{
			get { return limitmaxqty; }
			set { limitmaxqty = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int Limitmaxpur
		{
			get { return limitmaxpur; }
			set { limitmaxpur = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is bit</value>
		public bool IsReq_MinOrderAmt
		{
			get { return isReq_MinOrderAmt; }
			set { isReq_MinOrderAmt = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is bit</value>
		public bool IsReq_MinItemQty
		{
			get { return isReq_MinItemQty; }
			set { isReq_MinItemQty = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is bit</value>
		public bool Islimitfirstper
		{
			get { return islimitfirstper; }
			set { islimitfirstper = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is int</value>
		public int Countfirstper
		{
			get { return countfirstper; }
			set { countfirstper = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is bit</value>
		public bool Islimitmaxqty
		{
			get { return islimitmaxqty; }
			set { islimitmaxqty = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is bit</value>
		public bool Islimitmaxpur
		{
			get { return islimitmaxpur; }
			set { islimitmaxpur = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is varchar</value>
		public string FreeShippingService
		{
			get { return freeShippingService; }
			set { freeShippingService = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is bit</value>
		public bool FreeTax
		{
			get { return freeTax; }
			set { freeTax = value; }
		}
	
		/// <summary>
		/// 	
		/// </summary>
		/// <value>This type is bit</value>
		public bool IsExpired
		{
			get { return isExpired; }
			set { isExpired = value; }
		}
	
		
		#endregion
	}//End Class
	
	public enum a_CouponColumns
	{
		CouponID,
		RedemptionCode,
		Name,
		Note,
		CouponType,
		RecipientEmail,
		DateCreated,
		DateStart,
		DateEnd,
		EligibleType,
		Req_MinOrderAmt,
		Req_MinItemQty,
		MinQtyType,
		Req_Extended,
		CouponValueType,
		CouponValue,
		ApplyTo,
		Combinable,
		IncOnSpecials,
		IsDelete,
		Status,
		IsLock,
		DomainID,
		Limitfirstper,
		Limitmaxqty,
		Limitmaxpur,
		IsReq_MinOrderAmt,
		IsReq_MinItemQty,
		Islimitfirstper,
		Countfirstper,
		Islimitmaxqty,
		Islimitmaxpur,
		FreeShippingService,
		FreeTax,
		IsExpired
	}//End enum
}